<?php

use App\Comment;
use Illuminate\Database\Seeder;
use Illuminate\Support\Str;

class CommentsTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        //
        Comment::truncate();
        $faker = \Faker\Factory::create();

        // And now, let's create a few articles in our database:
        for ($i = 0; $i < 100; $i++) {
            Comment::create([
                'a_id' => random_int(1, 50),
                'content' => random_int(1, 14),
                'nickname' => random_int(0, 1),
                'email' => Str::random(8). '@163.com',
            ]);
        }
    }
}
